#include "CustomSceneControlCmd.h"

CustomSceneControlCmd::CustomSceneControlCmd(QObject *parent) :
    BaseCmd(parent)
{
    this->m_protocolType = ProtocolType::CloudProtocol;
    this->m_functionCode = FunctionCode;
    m_sceneId = 0;
}

Package CustomSceneControlCmd::toPackage()
{
    Package package;
    return package;
}

void CustomSceneControlCmd::unPackage(Package package)
{
    m_cmdId = package.id();
    QByteArray body;

    //body = decrypt(package.body(),KeyType::AES);

    quint16 index = 0;
    m_sceneId = body.mid(index,8).toHex().toInt(0,16);
    qDebug()<<"[CustomSceneControlCmd::unPackage] "<<m_sceneId;
}
quint64 CustomSceneControlCmd::sceneId() const
{
    return m_sceneId;
}

void CustomSceneControlCmd::setSceneId(const quint64 &sceneId)
{
    m_sceneId = sceneId;
}

